<?php
define('PHONE_CANNOT_EMPTY',1);
define('PASSWORD_CONNOT_EMPTTY',2);
define('USER_NOT_REG',3);
define('PASSWORD_ERROR',4);
define('CANSHU_ERROR',5);
define('PHONE_IS_EXITE',6);
define('REGISTER_SUCCESS',7);
define('REGISTER_FAIL',8);
define('GET_DATA_SUCCESS',9);
define('GET_DATA_FAILE',10);
define('LOGIN_SUCCESS',11);
define('RE_LOGIN',12);
define('CHECK_CODE_SEND_SUCCESS',13);
define('CHECK_CODE_SEND_FAIL',14);
define('CHECK_CODE_ERROR',15);
define('CHECK_CODE_SUCCESS',16);
define('CHECK_CODE_EXPRI',17);
define('LOGIN_OUT_FAIL',18);
define('LOGIN_OUT_SUCCESS',19);
define('RE_INPUT_PASSWORD',20);
define('PASSWORD_DIFF',21);
define('LOGIN_ERROR',22);
define('RECEIVER_CONTNOT_EMPTY',23);
define('AREA_LESS_CANSHU',24);
define('RECEIVER_ADDRESS_CONNOT_EMPTY',25);
define('ADD_SUCCESS',26);
define('ADD_FAIL',27);
define('UPDATE_DATA_SUCCESS',28);
define('UPDATE_DATA_FAIL',29);
define('DELETE_DATA_SUCCESS',30);
define('DELETE_DATA_FAIL',31);
define('TODAY_SIGNED',32);
define('SIGN_SUCCESS',33);
define('SIGN_FAIL',34);
define('YUCE_ICON_LESS',35);
define('RECEIVE_SUCCESS',36);
define('RECEIVE_FAIL',37);
define('CANNOT_COLLECT_RE',38);
define('COLLECT_SUCCESS',39);
define('COLLECT_FAIL',40);
define('DELETE_COLLECT_SUCCESS',41);
define('DELETE_COLLECT_FAIL',42);
define('OLD_PHONE_TRUE',43);
define('OLD_PHONE_ERROR',44);
define('EDITE_PHONE_SUCCESS',45);
define('EDITE_PHONE_FAIL',46);
define('EDITE_PASSWORD_SUCCESS',47);
define('EDITE_PASSWORD_FAIL',48);
define('BIND_PHONE_SUCCESS',49);
define('BIND_PHONE_FAIL',50);
define('SET_PASSWORD_SUCCESS',51);
define('SET_PASSWORD_FAIL',52);
define('CART_NOT_EXIT',53);
define('CANNOT_LESS_ONE',54);
define('SELECT_NOT_CART',55);
define('MOVE_SUCCESS',56);
define('PHONE_IS_NOT_EXIT',57);
define('ORDER_NOT_EXIT',58);
define('UPLOAD_SUCCESS',59);
define('UPLOAD_FAIL',60);
define('CATE_NOT_EXIT',61);
define('GOODS_NOT_EXIT',62);
define('CONNOT_COMMENT_RE',63);
define('COMMENT_SUCCESS',64);
define('COMMENT_FAIL',65);
define('CHOSE_ADDRESS',66);
define('CREATE_ORDER_SUCCESS',67);
define('CREATE_ORDER_FAIL',68);
define('USER_IS_FREEZE',69);
define('OLD_PHONE_EORR',70);
define('OPERA_SUCCESS',71);
define('OPERA_FAIL',72);
define('NAV_NOT_EXITS',73);
define('THE_CATE_HAVE_CONTENT',74);
define('HEADIMG_CONNOT_EMPTY',75);
define('MASTER_NAME_CONNET_EMPTY',76);
define('MASTER_PHONE_CONNET_EMPTY',77);
define('MASTER_POSTER_CONNET_EMPTY',78);
define('MASTER_INTRO_CONNET_EMPTY',79);
define('MASTER_CATE_CONNET_EMPTY',80);
define('MASTER_NOT_EXIT',81);
define('UPLOAD_VIDEO_FAIL',82);
define('CANNOT_RE_ADD',83);
define('CATE_IS_EXITE',84);
define('CATE_HAS_CHILD_CATE',85);
define('CATE_HAS_GOODS',86);
define('GOODS_NAME_EMPTY',87);
define('GOODS_CATE_EMPTY',88);
define('GOODS_ORIGINAL_PRICE_EMPTY',89);
define('GOODS_PRICE_EMPTY',90);
define('GOODS_THUMB_EMPTY',91);
define('GOODS_DESC_EMPTY',92);
define('GOODS_DETAIL_EMPTY',93);
define('GOODS_IS_EXITS',94);
define('GOODS_IS_NOT_EXIST',95);
define('COMMENT_IS_NOT_EXIST',96);
define('RECEIVE_ADDRESS_NOT_EXITS',97);
define('DENY_OPERATE_ORDER',98);
define('USER_NOT_EXISTS',99);
define('CATE_HAS_SLIDE',100);
define('SLIDE_NOT_EXIST',101);
define('NAV_IS_EXIST',102);
define('NAV_NOT_IS_EXITS',103);
define('NAV_HAS_MENU',104);
define('MENU_IS_EXIST',105);
define('MENU_HAS_CHILD',106);
define('SUPER_ADMIN_EXIST',107);
define('ADMIN_IS_NOT_EXIST',108);
define('IS_SUPER_ADMIN',109);
define('ADMIN_IS_EXITS',110);
define('NICKNAME_CONNT_EMPTY',111);
define('WECHAT_CONNET_EMPTY',112);
define('QQ_CONNOT_EMPTY',113);
define('QRCODE_CONNET_EMPTY',114);
define('SERVICER_NOT_EXITS',115);
define('SERVICER_EXITS',116);

$msgArr=array(
    PHONE_CANNOT_EMPTY     => '手机号码不能为空！',
    PASSWORD_CONNOT_EMPTTY => '登录密码不能为空！',
    USER_NOT_REG           => '该用户不存在！',
    PASSWORD_ERROR         => '密码不正确！',
    CANSHU_ERROR           => '参数错误！',
    PHONE_IS_EXITE         => '该手机号码已存在',
    REGISTER_SUCCESS       => '注册成功！',
    REGISTER_FAIL          => '注册失败！',
    GET_DATA_SUCCESS       => '获取数据成功',
    GET_DATA_FAILE         => '获取数据失败',
    LOGIN_SUCCESS          => '登陆成功！',
    RE_LOGIN               => '请重新登陆',
    CHECK_CODE_SEND_SUCCESS => '验证码发送成功',
    CHECK_CODE_SEND_FAIL    => '验证码发送失败',
    CHECK_CODE_ERROR        => '验证码错误',
    CHECK_CODE_SUCCESS      => '验证码正确',
    CHECK_CODE_EXPRI        => '验证码失效',
    LOGIN_OUT_FAIL          => '退出失败！',
    LOGIN_OUT_SUCCESS       => '退出成功！',
    RE_INPUT_PASSWORD       => '请输入确认密码',
    PASSWORD_DIFF           =>'两次密码不一致！',
    LOGIN_ERROR             => '登录错误，请重新登录',
    RECEIVER_CONTNOT_EMPTY  => '收货人不能为空',
    AREA_LESS_CANSHU        => '区域缺少参数',
    RECEIVER_ADDRESS_CONNOT_EMPTY =>'收货地址不能为空',
    ADD_SUCCESS             => '添加成功',
    ADD_FAIL                => '添加失败',
    UPDATE_DATA_SUCCESS     => '更新数据成功',
    UPDATE_DATA_FAIL        => '更新数据失败',
    DELETE_DATA_SUCCESS     => '删除数据成功',
    DELETE_DATA_FAIL        => '删除数据失败',
    TODAY_SIGNED            => '今日已签到',
    SIGN_SUCCESS            => '签到成功',
    SIGN_FAIL               => '签到失败',
    YUCE_ICON_LESS          => '遇策币金额不足',
    RECEIVE_SUCCESS         => '领取成功',
    RECEIVE_FAIL            => '领取失败',
    CANNOT_COLLECT_RE       => '该商品已经被收藏',
    COLLECT_SUCCESS         => '收藏成功！',
    COLLECT_FAIL            => '收藏失败',
    DELETE_COLLECT_SUCCESS  => '删除收藏成功',
    DELETE_COLLECT_FAIL     => '删除收藏失败',
    OLD_PHONE_TRUE          => '旧手机号码正确',
    OLD_PHONE_ERROR         => '旧手机号码错误',
    EDITE_PHONE_SUCCESS     => '修改手机号码成功',
    EDITE_PHONE_FAIL        => '修改手机号码失败',
    EDITE_PASSWORD_SUCCESS  => '修改密码成功',
    EDITE_PASSWORD_FAIL     => '修改密码失败',
    BIND_PHONE_SUCCESS      => '绑定手机号码成功',
    BIND_PHONE_FAIL         => '绑定手机号码失败',
    SET_PASSWORD_SUCCESS    => '设置密码成功',
    SET_PASSWORD_FAIL       => '设置密码失败',
    CART_NOT_EXIT           => '该购物车不存在',
    CANNOT_LESS_ONE         => '商品数量不能少于1',
    SELECT_NOT_CART         => '请选择购物车商品',
    MOVE_SUCCESS            => '移入成功',
    PHONE_IS_NOT_EXIT       => '该手机号不存在',
    ORDER_NOT_EXIT          => '该订单已被删除',
    UPLOAD_SUCCESS          => '上传成功',
    UPLOAD_FAIL             => '上传失败',
    CATE_NOT_EXIT           => '该分类不存在',
    GOODS_NOT_EXIT          => '该商品不存在',
    CONNOT_COMMENT_RE       => '该商品已经评价',
    COMMENT_SUCCESS         => '评论成功',
    COMMENT_FAIL            => '评论失败',
    CHOSE_ADDRESS           => '请选择收货地址',
    CREATE_ORDER_SUCCESS    => '创建订单成功',
    CREATE_ORDER_FAIL       => '创建订单失败',
    USER_IS_FREEZE          => '该账号被冻结，请联系超级管理员',
    OLD_PHONE_EORR          => '该手机号错误',
    OPERA_SUCCESS           => '操作成功',
    OPERA_FAIL              => '操作失败',
    NAV_NOT_EXITS           => '该菜单不存在',
    THE_CATE_HAVE_CONTENT   => '该分类下有内容不能被删除',
    HEADIMG_CONNOT_EMPTY    => '大师头像不能为空',
    MASTER_NAME_CONNET_EMPTY    => '大师名称不能为空',
    MASTER_PHONE_CONNET_EMPTY    => '大师手机号码不能为空',
    MASTER_POSTER_CONNET_EMPTY    => '大师海报不能为空',
    MASTER_INTRO_CONNET_EMPTY    => '大师介绍不能为空',
    MASTER_CATE_CONNET_EMPTY     => '大师分类不能为空',
    MASTER_NOT_EXIT              => '该大师不存在',
    UPLOAD_VIDEO_FAIL            => '上传视频失败',
    CANNOT_RE_ADD                => '请勿重复添加',
    CATE_IS_EXITE                => '该分类已存在',
    CATE_HAS_CHILD_CATE          => '该分类下有子分类，不能删除',
    CATE_HAS_GOODS               => '该分类下有商品，不能删除',
    GOODS_NAME_EMPTY             => '商品名称不能为空',
    GOODS_CATE_EMPTY             => '商品分类不能为空',
    GOODS_ORIGINAL_PRICE_EMPTY             => '商品原价不能为空',
    GOODS_PRICE_EMPTY             => '商品单价不能为空',
    GOODS_THUMB_EMPTY             => '商品缩略图不能为空',
    GOODS_DESC_EMPTY            => '商品描述不能为空',
    GOODS_DETAIL_EMPTY          => '商品详情不能为空',
    GOODS_IS_EXITS              => '该商品已存在',
    GOODS_IS_NOT_EXIST          => '该商品不存在',
    COMMENT_IS_NOT_EXIST        => '该商品评价不存在',
    RECEIVE_ADDRESS_NOT_EXITS   => '收货地址不存在',
    DENY_OPERATE_ORDER          => '不允许该订单操作',
    USER_NOT_EXISTS             => '该用户不存在',
    CATE_HAS_SLIDE              => '该分类下有轮播图，不能删除',
    SLIDE_NOT_EXIST             => '该轮播图存在',
    NAV_IS_EXIST                => '该导航已存在',
    NAV_NOT_IS_EXITS            => '该导航不存在',
    NAV_HAS_MENU                => '该导航下有菜单，不能删除',
    MENU_IS_EXIST               => '该菜单已存在',
    MENU_HAS_CHILD              => '该菜单下有子菜单，不能删除',
    SUPER_ADMIN_EXIST           => '超级管理员已存在',
    ADMIN_IS_NOT_EXIST          => '该管理员不存在',
    IS_SUPER_ADMIN              => '该管理员是超级管理员，不能删除或拉黑',
    ADMIN_IS_EXITS              => '管理员已存在',
    NICKNAME_CONNT_EMPTY        => '客服昵称不能为空',
    WECHAT_CONNET_EMPTY        => '客服微信号不能为空',
    QQ_CONNOT_EMPTY            => '客服qq号不能为空',
    QRCODE_CONNET_EMPTY        => '客服微信二维码不能为空',
    SERVICER_NOT_EXITS         => '该客服不存在',
    SERVICER_EXITS             => '该客服已存在',
);
define('MESSAGE_ARRAY',$msgArr);
function checkMsg($msg){
    $code=$msg;
    $message=MESSAGE_ARRAY[$msg];
    $msg=['code'=>$code,'msg'=>$message];
    return $msg;
}